Skip to content

Conversation

@s-perron
Copy link
Collaborator

Adds a diagnostic to flag the use of boolean bitfields in structs when targeting SPIR-V. This is not supported for variables that are not externally visible.

This change introduces a new error message in SemaHLSL to detect and report this unsupported usage for:

  • Local variables
  • Function parameters
  • Static global variables

A new test file is added to verify the diagnostic is triggered in these cases and not for externally visible global variables.

Avoid the segfault reported in
#7790.

Adds a diagnostic to flag the use of boolean bitfields in structs when targeting
SPIR-V. This is not supported for variables that are not externally visible.

This change introduces a new error message in SemaHLSL to detect and report this
unsupported usage for:
- Local variables
- Function parameters
- Static global variables

A new test file is added to verify the diagnostic is triggered in these cases
and not for externally visible global variables.

Avoid the segfault reported in
microsoft#7790.
Copy link
Collaborator

@Keenuts Keenuts left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah that's unfortunate... LGTM

@s-perron
Copy link
Collaborator Author

@llvm-beanz Ping

@s-perron s-perron merged commit d2f9d80 into microsoft:main Oct 22, 2025
12 checks passed
@github-project-automation github-project-automation bot moved this from New to Done in HLSL Roadmap Oct 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants